This section gives rewrite rules for the derived expression types. By the application of these rules, any expression can be reduced to a semantically equivalent expression in which only the primitive expression types (literal, variable, call, lambda, if, set!) occur.
where memv is an expression evaluating to the memv procedure.
where temp, temp, are variables, distinct
from variable, , that do not free occur in the
original init expressions, and undefined is an expression
which returns something that when stored in a location makes it an
error to try to obtain the value stored in the location. (No such
expression is defined, but one is assumed to exist for the purposes of this
rewrite rule.) The second let expression in the expansion is not
strictly necessary, but it serves to preserve the property that the
init expressions are evaluated in an arbitrary order.
The following alternative expansion for begin does not make use of
the ability to write more than one expression in the body of a lambda
expression. In any case, note that these rules apply only if
sequence contains no definitions.
The following expansion for do is simplified by the assumption that no step is omitted. Any do expression in which a step is omitted can be replaced by an equivalent do expression in which the corresponding variable appears as the step.
where loop is any variable which is distinct from
variable, , and which does not occur free in the do
expression.
where make-promise is an expression evaluating to some procedure
which behaves appropriately with respect to the force procedure;
see section .